home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 2000 July / macformat-092.iso / MacFormat 92 CD / Shareware Plus / Utilities / FolderSynchronizer 1.8.9 / PlugIn / SR / 00013_ScrBtnVThumb.ls < prev    next >
Encoding:
Text File  |  2000-03-23  |  1.1 KB  |  31 lines

  1. on beginSprite me
  2.   set mySprite to the spriteNum of me
  3.   DrawControlVThumb(mySprite)
  4. end
  5.  
  6. on mouseDown me
  7.   global gCurrLine, gTotLines, gMaxLines, gCurrLogText
  8.   set mySprite to the spriteNum of me
  9.   set myMember to the name of member the member of sprite mySprite
  10.   set the member of sprite mySprite to BtnDw(myMember)
  11.   set deltaV to the mouseV - the locV of sprite mySprite
  12.   repeat while the stillDown
  13.     set HA to float(the locV of sprite mySprite) - float(the top of sprite 23)
  14.     set Perc to HA / float(the height of sprite 23)
  15.     set the locV of sprite mySprite to constrainV(23, the mouseV - deltaV)
  16.     updateStage()
  17.   end repeat
  18.   set gCurrLine to integer((gTotLines - gMaxLines + 1) * Perc) + 1
  19.   if gCurrLine < 1 then
  20.     set gCurrLine to 1
  21.   end if
  22.   if (gCurrLine + gMaxLines - 1) > gTotLines then
  23.     set gCurrLine to gTotLines - gMaxLines + 1
  24.   end if
  25.   set the member of sprite mySprite to BtnUp(myMember)
  26.   set LastLine to gCurrLine + gMaxLines - 1
  27.   ImpostaVThumb()
  28.   updateStage()
  29.   put line gCurrLine to LastLine of gCurrLogText into field "fReport"
  30. end
  31.